<template>
	<view :style="[textStyle]"> </view>
</template>

<script>
	import mixin from "../../libs/mixin/mixin.js"
	export default {
		name: "m-text",
		mixins: [mixin],
		data() {
			return {

			};
		},
		props: {
			wh: {
				type: String,
				default: '1',
			},
			// 方向
			vertical: {
				type: Boolean,
				default: false,
			},
			spa: {
				type: String,
				default: '1 0 1 0',
			},
			type: {
				type: String,
				default: 'solid',
			},
			color: {
				type: String,
				default: 'rgba(0,0,0,0.05)',
			},
		},
		computed: {
			textStyle() {
				const style = {
					...this.style,
					"width": '100%',
					'height': '2rpx',
					'borderColor': this.color,
					'borderTopWidth': this.wh + 'rpx',
					"borderStyle": this.type
				}
				if (this.vertical) {
					style['width'] = '2rpx'
					style['height'] = '100%'
					style['borderLeftWidth'] = this.wh + 'rpx'
				}
				return style
			},
		},
	}
</script>

<style lang="scss">

</style>